
/**
 * Defines all routes required for this application
 */
ExtMVC.Router.defineRoutes = function(map) {
	/**
	 * Sets up REST-like urls for a given model or models:
	 * 
	 * map.resources('users');
	 * 
	 * Is equivalent to:
	 * map.connect("users",           {controller: 'users', action: 'index'}); // #users
	 * map.connect("users/new",       {controller: 'users', action: 'new'  }); // #users/new
	 * map.connect("users/:id/edit/", {controller: 'users', action: 'edit' }); // #users/1/edit
	 * map.connect("users/:id",       {controller: 'users', action: 'show' }); // #users/1
	 * 
	 * You can pass more than one model to a map.resources call, e.g.:
	 *
	 * map.resources('users', 'comments', 'pages', 'products');
	 */

	// Setup the fake route for messageboard + chatroom
	map.connect("messageboard", {
				controller	: 'boardposts',
				action		: 'index'
			});
	map.connect("chatroom", {
				controller	: 'chat',
				action		: 'index'
			});
	map.connect("blogs", {
				controller	: 'blogs',
				action		: 'index'
			});
	map.connect("blog", {
				controller	: 'blogs',
				action		: 'index'
			});

	map.resources('blog', 'bookmarks', 'boardposts', 'doodle', 'filecabinet',
			'idcards', 'invite', 'photos', 'microblogs', 'overview',
			'settings', 'stickies', 'tasks', 'videos'
	);

	// set up default routes
	map.connect(":controller/:action");
	map.connect(":controller/:action/:id");

	// if no url, should a default
	map.root({
				controller	: 'index',
				action		: 'index'
			});
};